package br.com.processo.modelo;

import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "SETOR")
@AttributeOverride(name = "id", column = @Column(name = "ID_SETOR"))
public class Setor extends Identificavel {

	@Column(name = "TIPO_SETOR")
	private String tipoSetor;

	@OneToMany(mappedBy = "setor", cascade = CascadeType.ALL)
	private List<Processo> processos;

	@OneToMany(mappedBy = "setor")
	private List<Usuario> usuarios;

	public Setor() {
	}

	public List<Usuario> getUsuarios() {
		return usuarios;
	}

	public void setUsuarios(List<Usuario> usuarios) {
		this.usuarios = usuarios;
	}

	public List<Processo> getProcessos() {
		return processos;
	}

	public void setProcessos(List<Processo> processos) {
		this.processos = processos;
	}

	public String getTipoSetor() {
		return tipoSetor;
	}

	public void setTipoSetor(String tipoSetor) {
		this.tipoSetor = tipoSetor;
	}

}
